#include <iostream>
#include <vector>

using namespace std;

void quick_sort(vector<int> &vec,int left,int right)
{
    if(left >= right)
        return; 
    int low = left;
    int high = right;
    int key = vec[low];
    while(low < high)
    {
        while(low < high && vec[high] >= key) 
            high--;
        if(low < high)
            vec[low++] = vec[high];
        while(low < high && vec[low] < key)
            low++;
        if(low < high)
            vec[high--] = vec[low];
    }
    vec[high] = key;

    quick_sort(vec,left,high - 1);
    quick_sort(vec,high + 1,right);
}

int main()
{
    int num;
    cin >> num;

    vector<int> vec;
    int temp;
    for(int i = 0; i < num; ++i)
    {
        cin >> temp;
        vec.push_back(temp);
    }

    quick_sort(vec,0,num - 1);

    for(vector<int>::iterator it = vec.begin(); it != vec.end(); ++it)
    {
        cout << *it << " ";
    }
    cout << endl;

    return 0;
}
